import { reactive, ref } from "vue";

export default function InitHook() {
  const searchForm = reactive<Partial<DriverManagement.SearchForm>>({
    status: undefined,
    haveArea: undefined,
    userId: undefined,
    areaName: undefined,
    streetName: undefined,
    pageNum: 1,
    pageSize: 100,
    total: 0
  });
  const tableData = ref<Array<DriverManagement.ListRows>>([]);
  const dialogOpts = reactive<Base.DialogOpts>({
    title: "",
    width: "520px",
    component: "",
    type: 1,
    passData: {},
    visible: false
  });
  const drawerOpts = reactive<Base.DrawerOpts>({
    title: "",
    width: "1000px",
    component: "",
    type: 1,
    passData: {},
    visible: false
  });
  return {
    searchForm,
    tableData,
    dialogOpts,
    drawerOpts
  };
}
